package com.ece.pfe_rover_pvt_ines_ece_application.model;

import java.text.NumberFormat;

/**
 * Model Class corresponding to Measurements Object from PARSE
 * @author mathieubakrim
 *
 */
public class SimpleMeasurement {
	private NumberFormat nf;
	private static final int SIGNIFICANT_NB = 5; 
	
	private int EntryId, // unique id for each line of the file
				  IdPan; // Pan 1 or 2
	private Double I,		// Intensité
				  V,		// Tension
				  lum,		// Luminosité				  
				  Tair,		// Température air
				  Swind,	// Vitesse du vent
				  P,		// Puissance
				  Tpan;		// Température panneaux
				  				  		
	Long timeStamp;
	private String GPS;

	public SimpleMeasurement(int entryId, int idPan, Double i, Double v,
			Double lum, Double tair, Double swind, Double p, Double tpan,
			long timeStamp, String gPS) {
		super();
		EntryId = entryId;
		IdPan = idPan;
		I = i;
		V = v;
		this.lum = lum;
		Tair = tair;
		Swind = swind;
		P = p;
		Tpan = tpan;
		this.timeStamp = timeStamp;
		GPS = gPS;
	}

	public SimpleMeasurement() {
		// TODO Auto-generated constructor stub
		nf = NumberFormat.getInstance();
	}

	public SimpleMeasurement(int entryId2, int idPan2, double i2, double v2,
			double lum2, double tair2, double swind2, double p2, double tpan2,
			String string, String gPS2) {
		// TODO Auto-generated constructor stub
	}

	/**
	 * @return the idPan
	 */
	public int getIdPan() {	return IdPan;}

	/**
	 * @param idPan the idPan to set
	 */
	public void setIdPan(int idPan) {
		IdPan = idPan;}

	/**
	 * @return the i
	 */
	public double getI() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return I;
	}

	/**
	 * @param d the i to set
	 */
	public void setI(double d) {I = d;}

	/**
	 * @return the v
	 */
	public double getV() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return V;
	}

	/**
	 * @param v the v to set
	 */
	public void setV(double v) {V = v;}

	/**
	 * @return the lum
	 */
	public double getLum() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return lum;
	}

	/**
	 * @param lum the lum to set
	 */
	public void setLum(double lum) {this.lum = lum;}

	/**
	 * @return the tair
	 */
	public double getTair() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return Tair;
	}

	/**
	 * @param tair the tair to set
	 */
	public void setTair(double tair) {Tair = tair;}

	/**
	 * @return the swind
	 */
	public double getSwind() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return Swind;
	}

	/**
	 * @param swind the swind to set
	 */
	public void setSwind(double swind) {Swind = swind;}

	/**
	 * @return the p
	 */
	public double getP() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return P;
	}

	/**
	 * @param p the p to set
	 */
	public void setP(double p) {P = p;}

	/**
	 * @return the tpan
	 */
	public double getTpan() {
		nf.setMaximumFractionDigits(SIGNIFICANT_NB);
		return Tpan;
	}

	/**
	 * @param tpan the tpan to set
	 */
	public void setTpan(double tpan) {Tpan = tpan;}

	/**
	 * @return the timeStamp
	 */
	public Long getTimeStamp() {return timeStamp;}

	/**
	 * @param timeStamp the timeStamp to set
	 */
	public void setTimeStamp(Long timeStamp) {this.timeStamp = timeStamp;}

	/**
	 * @return the gPS
	 */
	public String getGPS() {return GPS;}

	/**
	 * @param gPS the gPS to set
	 */
	public void setGPS(String gPS) {GPS = gPS;}

	/**
	 * 
	 * @return EntryId 
	 */
	public int getEntryId() {return EntryId;}

	/**
	 * The entryId to set
	 * @param entryId
	 */
	public void setEntryId(int entryId) {this.EntryId = entryId;}		
}
